﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CreateWorkshopA.aspx.vb" Inherits="TWIN_test.CreateWorkshopA" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Create a Workshop</title>
</head>
 <!--<body background="../../Images/Training-Administrator-Background.gif"> -->
 <body background="../../Images/Training-Administrator-Background.gif">
    <form id="form1" runat="server">
    <center><div>
     <b>Create a New Workshop</b> <br />
     <table>
        <tr><td>Workshop ID:    </td><td><asp:TextBox ID="workshopIdBox" runat="server"></asp:TextBox></td></tr>

        <tr><td>Workshop Title: </td><td><asp:TextBox ID="workshopTitleBox" runat="server"></asp:TextBox></td></tr>
       
        <tr><td>Instructor UserName: </td><td><asp:TextBox ID="workshopInstructorUserNameBox" runat="server">   </asp:TextBox></td></tr>

        <tr><td>Workshop Description: </td><td><asp:TextBox ID="workshopDescriptionBox" runat="server" > </asp:TextBox></td></tr>

        <tr><td>Workshop Start: </td><td><asp:TextBox id="workshopStartBox" runat="server"></asp:TextBox></td></tr>

        <tr><td>Workshop Finish: </td><td><asp:TextBox id="workshopFinishBox" runat="server"> </asp:TextBox></td></tr>

        <tr><td>Location: </td><td><asp:TextBox id="workshopLocationBox" runat="server"> </asp:TextBox></td></tr> 
         </table>
    <br /> <asp:Button id="createButton"  runat="server" text="Create and SaveWorkshop" />  
    <br /> <asp:Button id="backButton" runat="server" text="Back" />
   
       
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" 
            DeleteCommand="DELETE FROM &quot;WORKSHOP&quot; WHERE &quot;ID&quot; = :ID" 
            InsertCommand="INSERT INTO &quot;WORKSHOP&quot; (&quot;ID&quot;, &quot;TITLE&quot;, &quot;INSTRUCTORID&quot;, &quot;DESCRIPTION&quot;, &quot;WORKSHOPSTART&quot;, &quot;WORKSHOPFINISH&quot;, &quot;LOCATION&quot;) VALUES (:ID, :TITLE, :INSTRUCTORID, :DESCRIPTION, :WORKSHOPSTART, :WORKSHOPFINISH, :LOCATION)" 
            ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" 
            SelectCommand="SELECT * FROM &quot;WORKSHOP&quot;" 
            UpdateCommand="UPDATE &quot;WORKSHOP&quot; SET &quot;TITLE&quot; = :TITLE, &quot;INSTRUCTORID&quot; = :INSTRUCTORID, &quot;DESCRIPTION&quot; = :DESCRIPTION, &quot;WORKSHOPSTART&quot; = :WORKSHOPSTART, &quot;WORKSHOPFINISH&quot; = :WORKSHOPFINISH, &quot;LOCATION&quot; = :LOCATION WHERE &quot;ID&quot; = :ID">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Decimal" />
            </DeleteParameters>

            <InsertParameters>
                <asp:Parameter Name="ID" Type="String"/>
                <asp:Parameter Name="TITLE" Type="String"/>
                <asp:Parameter Name="INSTRUCTORID" Type="String"/>
                <asp:Parameter Name="DESCRIPTION" Type="String" />
                <asp:Parameter Name="WORKSHOPSTART" Type="DateTime" />
                <asp:Parameter Name="WORKSHOPFINISH" Type="DateTime" />
                <asp:Parameter Name="LOCATION" Type="String" /> 
            </InsertParameters>

            <UpdateParameters>
                <asp:Parameter Name="TITLE" Type="String" />
                <asp:Parameter Name="INSTRUCTORID" Type="Object" />
                <asp:Parameter Name="DESCRIPTION" Type="String" />
                <asp:Parameter Name="WORKSHOPSTART" Type="DateTime" />
                <asp:Parameter Name="WORKSHOPFINISH" Type="DateTime" />
                <asp:Parameter Name="LOCATION" Type="String" />
                <asp:Parameter Name="ID" Type="Decimal" />
            </UpdateParameters>
        </asp:SqlDataSource>
   
       
    </div></center>
    </form>
</body>
 
</html>
